﻿ 
using System;
using YunZuan.Models.Attributes;
using YunZuan.Models.Entities;

namespace YunZuan.Models
{
    [Table(TableName = "yz_notice", PrimaryKey = "NoticeID")]
    public class NoticeInfo : BaseEntity
    {
        #region Private Properties
        private int? _noticeID;
        private int? _userID;
        private string _title;
        private string _content;
        private DateTime? _createTime;
        private short? _status;
        private short? _reader;
        private int _pageView;

        #endregion

        #region Public Properties
        /// <summary>
        /// LogID.
        /// </summary>
        [Column(IsAutoIncrement = true)]
        public int? NoticeID
        {
            get
            {
                return _noticeID;
            }
            set
            {
                this.ChangeNotify<int?>("NoticeID", value, ref _noticeID);
            }
        }

        /// <summary>
        /// UserID.
        /// </summary>
        public int? UserID
        {
            get
            {
                return _userID;
            }
            set
            {
                this.ChangeNotify<int?>("UserID", value, ref _userID);
            }
        }

        /// <summary>
        /// IP.
        /// </summary>
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                this.ChangeNotify<string>("Title", value, ref _title);
            }
        }

        /// <summary>
        /// LogType.
        /// </summary>
        public string Content
        {
            get
            {
                return _content;
            }
            set
            {
                this.ChangeNotify<string>("Content", value, ref _content);
            }
        }

        /// <summary>
        /// CreateTime.
        /// </summary>
        public DateTime? CreateTime
        {
            get
            {
                return _createTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("CreateTime", value, ref _createTime);
            }
        }

        /// <summary>
        /// Status
        /// </summary>
        public short? Status
        {
            get
            {
                return _status;
            }
            set
            {
                this.ChangeNotify<short?>("Status", value, ref _status);
            }
        }

        /// <summary>
        /// Reader
        /// </summary>
        public short? Reader
        {
            get
            {
                return _reader;
            }
            set
            {
                this.ChangeNotify<short?>("Reader", value, ref _reader);
            }
        }

        /// <summary>
        /// PageView
        /// </summary>
        public int PageView
        {
            get
            {
                return _pageView;
            }
            set
            {
                this.ChangeNotify<int>("PageView", value, ref _pageView);
            }
        }

        #endregion
    }
}
